home *** CD-ROM | disk | FTP | other *** search
- > 1) Set the SO_KEEPALIVE socket level option. This will send an empty
- > message every 45 seconds (BSD) and expect a response within 6
- > minutes (BSD). If it times out the next operation on the socket
- > should fail.
-
- Be careful, though. RFC 1122 "Hosts Requirements" says the default
- timeout between keepalives is 2 hours. If that doesn't sound too
- useful you're right, it's not supposed to be. The implication is
- that Keep Alives are considered evil and should be avoided. Your
- mileage can vary greatly between TCP/IP implemenations.
-
- You are much better off using you're own timer and sending your own
- keepalive ("are you there"/"yes I'm here") type messages.
-
- > 2) The asynch select doesn't get notified if a timeout happens unless
- > you have written data to the socket (speculation here).
-
- If a keep-alive generates a reset when the other end of a connection
- has apprently gone away (i.e. it's stopped responding to keepalives)
- then a message should be posted (take your pick which message, any
- of them can contain an error).
-
- >I just have
- > a timer that tries to write data every once in a while to make
- > sure a timeout hasn't occurred.
-
- In this case, you don't need keep-alives.
-
- Regards,
- --
- Bob Quinn rcq@ftp.com
- FTP Software, Inc. No. Andover, MA
-
-